
#import <Foundation/Foundation.h>
#import "WebRTC/WebRTC.h"
//#import "ViewController.h"
//#import "BotManager.h"
@protocol WebSocketDelegate
- (void)onPublisherJoined:(NSNumber *)handleId;
- (void)onPublisherRemoteJsep:(NSNumber *)handleId dict:(NSDictionary *)jsep;
- (void)subscriberHandleRemoteJsep: (NSNumber *)handleId dict:(NSDictionary *)jsep;
- (void)onLeaving:(NSNumber *)handleId;
@end


@interface WebSocketChannel : NSObject

@property id<WebSocketDelegate> delegate;

- (instancetype)initWithURL:(NSURL *)url;

- (void)publisherCreateOffer:(NSNumber *)handleId sdp:(RTCSessionDescription *)sdp;

- (void)subscriberCreateAnswer:(NSNumber *)handleId sdp: (RTCSessionDescription *)sdp;

- (void)trickleCandidate:(NSNumber *)handleId candidate: (RTCIceCandidate *)candidate;

- (void)trickleCandidateComplete:(NSNumber *)handleId;

- (void)subscriberOnLeaving:(NSNumber *) handleId;

- (void)disconnect;

@end
